<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设置</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../themes/jquery.mobile.icons.min.css" />
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/mobile.css" />
    <link rel="stylesheet" href="../themes/orange.min.css" />
  
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-1.11.3.min.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-migrate-1.2.1.min.js"></script>
    <script src="http://wanjia.mcooz.com/views/mobile_basic/javascript/mobile.js"></script>
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/index.css" />
      <link href="../font/css/font-awesome.css" rel="stylesheet">

        <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/form/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/validate.js"></script>
    <link rel="stylesheet" type="text/css" href="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/style.css" />
     <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/main.js"></script>

<style>
#header ul li.active {
  display: block;
}
#header ul li {
  color: #fff;
  display: none;
  font-size: 18px;
  height: 40px;
  line-height: 40px;
  position: relative;
  text-align: center;
}
#header ul li.active {
  display: block;
}
    .blue{color:#ff7700;}
    .pdt20{padding-top: 20px;}
   #Home {
  background: #EEE;
}
.mgt20{
    margin-top: 20px;
}
.border-t, .border-b {
  position: relative;
}
#target{
     display: block;
}
</style>

</head>

<body>

<div data-role="page"   class="content">
  <div data-role="header" id="header" class="kros_header" data-position="fixed">
        <a href="#kros_panel" id="back" data-rel="back" class="ui-btn-left ui-btn-corner-all ui-btn ui-icon-home ui-btn-icon-notext ui-shadow">Back</a>
        <a href="index.html" id="search" data-ajax="false" class="ui-btn ui-btn-letf  ui-btn-corner-all ui-btn-icon-notext  ui-icon-search ui-shadow">search</a>
        <ul>
            <li class="border-b active" >设置</li>
           
            </ul>
        </div>

<div role="main" id="target">
    <div class="kros_content ">

   
        <ul data-role="listview" data-theme="b" class="kros_view">
           
            <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-download mgr6 blue"></i>检查更新</a></li>

          
       
        </ul>

         <ul data-role="listview" data-theme="b" class="kros_view mgt20">

            <li class="ui-first-child">
               <a  class="ui-btn text-center " onclick="log_out();" style="text-align:center">
                   退出登录
                    </a>
            </li>
           </ul>
    </div>
</div>
    </div>

   

</body>
</html>
<script>
apiready = function(){

var winWidth = api.winWidth;
var winHeight = api.winHeight;


$(".content").css({ width:winWidth,height:winHeight});
var header = $api.byId('header');
$api.fixStatusBar(header);
var  top=$api.dom('.border-b').offsetTop+3;
$("#back,#search").css({ top:top});
var  height=$api.dom('#header').offsetHeight+3;
$("#target").css({ marginTop:top-3});

      
}
function log_out () {  

$api.setStorage('userArr', '');

url = 'http://www.mcooz.com/Login/logout_app';
api.ajax({
            url: url,
            method: 'post',
            data: {
                values: {
                    username: "a",
                   
                }
            }
        }, function(json, err) {

           // alert(json.user_id);

            if (json.status==11) {


                alert("安全退出!")

                api.sendEvent({
                name: 'logOutEvent',
                extra:  {
                token: '',
                status: 0, 
                user_id: -1,
                message: '安全退出'
                }
                })

             // SwitchBtn(0)

              api.closeWin(); 


             /*       var logHtml = template.render('logTemplate',json);



                    $('#kros_panel').empty().append(logHtml);
*/

            };

      

        });
}

 function SwitchBtn(index) {

         api.setFrameGroupIndex({
            name: 'group',
            index: index
        });

     }
</script>



